package com.wink.service;

import java.util.ArrayList;

import com.wink.charity.Charity;
import com.wink.charity.CharityList;
import com.wink.dt.Comment;
import com.wink.dt.Topic;
import com.wink.dt.TopicList;
import com.wink.event.Event;
import com.wink.event.EventList;

import javax.ws.rs.Consumes;
import javax.ws.rs.FormParam;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.UriInfo;


@Path("/community")
public interface CommunityServices {

	@Path("/services")
	@GET
	@Produces(MediaType.TEXT_PLAIN)
	public String getServices();			
	  
	@Path("/charity")
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public String listAllCharity();	
	
	/*@Path("/charity")
	@PUT
	@Produces(MediaType.APPLICATION_XML)
	public Charity createCharity(Charity charity);*/
		
	@Path("/charity")
	@PUT
	@Produces(MediaType.APPLICATION_XML)
	public String createCharity(String charity);	//charity contains jason.toString of Charity
	
	
	@Path("/charity/{name}")
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public String GetCharityByName(@PathParam("name") String name );	//CharityList - contains Charity from multiple communities
	
	@Path("/charity/donate")
	@POST
	@Produces(MediaType.APPLICATION_XML)
	public String donate(String charity); //charity contains jason.toString of Charity
		
			
	//DT actions	
	@Path("/discussionboard")
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public String listAllDiscussion();
		
		//public Topic createTopic(String title, String content, String createdUser, String communityID, Date createdDate)
	@Path("/discussionboard")
	@PUT
	@Produces(MediaType.APPLICATION_XML)
	public String createTopic(String topic);
		
		//createComment(String topic, String topicCommunity, String commentText, String commentBy, Date commentDate, fromCommunityID, fromUser4)
	@Path("/discussionboard/comment")
	@PUT
	@Produces(MediaType.APPLICATION_XML)
	public void createComment(String comment);			
		
	@Path("/discussionboard/1/{name}")
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public String getTopicByName(@PathParam("name") String name); // TopicList contains Topic list of top level shell. No embedded Comments
	
	@Path("/discussionboard/2/{name}")
	@GET
	@Produces(MediaType.APPLICATION_XML)
	public String getTopicDetails(@PathParam("name") String name); // return Topic contains Topic  with embedded Comments

}
